package day14.tarena.homeword;

import java.util.Comparator;
import java.util.SortedSet;
import java.util.TreeSet;

import day14.tarena.com.Student1;

public  class TestTreeSet implements Comparator {
	
	SortedSet ts = new TreeSet();

	public int compare(Product p1, Product p2) {
		if(p1 == null || p2 == null)return 0;
		if(p1.getPrice() > p2.getPrice()){
			return 1;
		}else if(p1.getPrice() < p2.getPrice()){
			return -1;
		}else{
		return 0;
		}  
	}

	public int compare(Object o1, Object o2) {
		
		return 0;
	}

}
